<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateDomainInduceInfoTable extends Migration
{
    public function up()
    {
//        Schema::create('domain_induce_info', function (Blueprint $table) {
//
//            $table->bigIncrements('id');
//            $table->string('domain',32)->unique()->comment('域名');
//            $table->boolean('self_self')->nullable()->comment('自持');
//            $table->unsignedDecimal('self_price',10,2)->default(0)->comment('成本');
//
//            $table->string('testing_qq',12)->nullable()->comment('QQ检测');
//            $table->string('testing_wechat',12)->nullable()->comment('微信检测');
//            $table->string('testing_condition',12)->nullable()->comment('被墙/污染');
//
//            $table->string('sougou_shourushu',64)->nullable()->comment('搜狗收录/污染');
//            $table->string('sougou_title',64)->nullable()->comment('搜狗标题');
//            $table->string('sougou_describe')->nullable()->comment('搜狗描述');
//            $table->string('sougou_snapshot',64)->nullable()->comment('快照时间');
//            $table->string('sougou_pr_old',64)->nullable()->comment('搜狗PR【历史】');
//            $table->string('sougou_re_link',64)->nullable()->comment('搜狗反链');
//            $table->string('sougou_official',64)->nullable()->comment('搜狗官网');
//            $table->string('sougou_news_source',64)->nullable()->comment('新闻源');
//
//            $table->string('old_age',64)->nullable()->comment('年龄');
//            $table->string('old_count',64)->nullable()->comment('数量');
//            $table->string('old_last',64)->nullable()->comment('最老');
//            $table->string('old_new',64)->nullable()->comment('最新');
//            $table->string('old_chines',64)->nullable()->comment('中文');
//            $table->string('old_percent',64)->nullable()->comment('占比');
//            $table->string('old_unified_percent',64)->nullable()->comment('统一度');
//            $table->string('old_year_5',64)->nullable()->comment('五年建站');
//            $table->string('old_language',64)->nullable()->comment('语言');
//            $table->string('old_label')->nullable()->comment('标记');
//            $table->string('old_keyword')->nullable()->comment('关键词');
//            $table->string('old_year_sort',64)->nullable()->comment('年排序');
//            $table->string('old_title',64)->nullable()->comment('标题');
//            $table->string('old_remarks',64)->nullable()->comment('历史备注');
//
//            $table->string('icp_company',64)->nullable()->comment('单位名称');
//            $table->string('icp_type',64)->nullable()->comment('单位性质');
//            $table->string('icp_num',64)->nullable()->comment('ICP备案号');
//            $table->string('icp_region',64)->nullable()->comment('备案地区');
//            $table->string('icp_site_name',64)->nullable()->comment('网站名称');
//            $table->string('icp_audit_time',64)->nullable()->comment('审核时间');
//            $table->string('icp_provider',64)->nullable()->comment('接入商');
//            $table->string('icp_status',64)->nullable()->comment('状态');
//            $table->string('icp_blacklist',64)->nullable()->comment('备案黑名单');
//            $table->string('icp_police',64)->nullable()->comment('备案地公安机关');
//            $table->string('icp_multi',64)->nullable()->comment('批量备案');
//
//            $table->string('base_delete_type',64)->nullable()->comment('删除类型');
//            $table->string('base_delete_day',64)->nullable()->comment('删除日期');
//            $table->string('base_suffix',64)->nullable()->comment('后缀');
//            $table->string('base_email',64)->nullable()->comment('邮箱');
//            $table->string('base_people',64)->nullable()->comment('注册人');
//            $table->string('base_registrant',64)->nullable()->comment('注册商');
//            $table->string('base_reg_day',64)->nullable()->comment('注册时间');
//            $table->string('base_end_day',64)->nullable()->comment('到期时间');
//            $table->string('base_reg_age',64)->nullable()->comment('注册年龄');
//            $table->string('base_old',64)->nullable()->comment('是否老域名');
//            $table->string('base_available_day',64)->nullable()->comment('可用天数');
//            $table->string('base_status',64)->nullable()->comment('域名状态');
//
//            $table->string('baidu_included',64)->nullable()->comment('百度收录量');
//            $table->string('baidu_grey',64)->nullable()->comment('百度灰');
//            $table->string('baidu_safe',64)->nullable()->comment('百度安全');
//            $table->string('baidu_official',64)->nullable()->comment('百度官网');
//            $table->string('baidu_v_log',64)->nullable()->comment('百度V认证');
//            $table->string('baidu_evaluate',64)->nullable()->comment('百度评价');
//            $table->string('baidu_weight',64)->nullable()->comment('百度权重');
//            $table->string('baidu_re_link',64)->nullable()->comment('百度反链');
//            $table->string('baidu_testing',64)->nullable()->comment('百度检测');
//            $table->string('baidu_re_amount',64)->nullable()->comment('反向链接数量');
//            $table->string('baidu_high_weight_5',64)->nullable()->comment('高权重5+');
//            $table->string('baidu_gov',64)->nullable()->comment('Gov外链');
//
//            $table->string('360_included',64)->nullable()->comment('360收录');
//            $table->string('360_weight',64)->nullable()->comment('360权重');
//            $table->string('360_official',64)->nullable()->comment('360官网');
//
//        });
        Schema::create('domain_induce_info', function (Blueprint $table) {

            $table->bigIncrements('id');
            $table->string('domain',32)->unique()->comment('域名');
            $table->boolean('self_self')->nullable()->comment('自持');
            $table->unsignedDecimal('self_price',10,2)->default(0)->comment('成本');

            $table->unsignedTinyInteger('testing_qq')->nullable()->comment('QQ检测');
            $table->unsignedTinyInteger('testing_wechat')->nullable()->comment('微信检测');
            $table->unsignedTinyInteger('testing_condition')->nullable()->comment('被墙/污染');

            $table->unsignedInteger('sougou_shourushu')->nullable()->comment('搜狗收录');
            $table->string('sougou_title',64)->nullable()->comment('搜狗标题');
            $table->string('sougou_describe')->nullable()->comment('搜狗描述');
            $table->date('sougou_snapshot')->nullable()->comment('快照时间');
            $table->unsignedSmallInteger('sougou_pr_old')->nullable()->comment('搜狗PR【历史】');
            $table->unsignedInteger('sougou_re_link')->nullable()->comment('搜狗反链');
            $table->unsignedTinyInteger('sougou_official')->nullable()->comment('搜狗官网');
            $table->unsignedTinyInteger('sougou_news_source')->nullable()->comment('新闻源');

            $table->unsignedSmallInteger('old_age')->nullable()->comment('年龄');
            $table->unsignedInteger('old_count')->nullable()->comment('数量');
            $table->string('old_last',4)->nullable()->comment('最老');
            $table->string('old_new',4)->nullable()->comment('最新');
            $table->unsignedSmallInteger('old_chines')->nullable()->comment('中文');
            $table->unsignedTinyInteger('old_percent')->nullable()->comment('占比');
            $table->unsignedTinyInteger('old_unified_percent')->nullable()->comment('统一度');
            $table->unsignedTinyInteger('old_year_5')->nullable()->comment('五年建站');
            $table->string('old_language',12)->nullable()->comment('语言');
            $table->string('old_label')->nullable()->comment('标记');
            $table->string('old_keyword')->nullable()->comment('关键词');
            $table->string('old_year_sort',64)->nullable()->comment('年排序');
            $table->string('old_title',64)->nullable()->comment('标题');
            $table->unsignedTinyInteger('old_remarks',)->nullable()->comment('历史备注');

            $table->string('icp_company',32)->nullable()->comment('单位名称');
            $table->string('icp_type',32)->nullable()->comment('单位性质');
            $table->string('icp_num',32)->nullable()->comment('ICP备案号');
            $table->string('icp_region',32)->nullable()->comment('备案地区');
            $table->string('icp_site_name',32)->nullable()->comment('网站名称');
            $table->string('icp_audit_time',4)->nullable()->comment('审核时间 只取年');
            $table->string('icp_provider',32)->nullable()->comment('接入商');
            $table->unsignedTinyInteger('icp_status')->nullable()->comment('状态');
            $table->unsignedTinyInteger('icp_blacklist')->nullable()->comment('备案黑名单');
            $table->string('icp_police',32)->nullable()->comment('备案地公安机关');
            $table->unsignedTinyInteger('icp_multi')->nullable()->comment('批量备案');

            $table->string('base_delete_type',32)->nullable()->comment('删除类型');
            $table->date('base_delete_day')->nullable()->comment('删除日期');
            $table->string('base_suffix',16)->nullable()->comment('后缀');
            $table->string('base_email',32)->nullable()->comment('邮箱');
            $table->string('base_people',32)->nullable()->comment('注册人');
            $table->string('base_registrant',32)->nullable()->comment('注册商');
            $table->date('base_reg_day')->nullable()->comment('注册时间');
            $table->date('base_end_day')->nullable()->comment('到期时间');
            $table->unsignedSmallInteger('base_reg_age')->nullable()->comment('注册年龄');
            $table->boolean('base_old')->nullable()->comment('是否老域名');
            $table->unsignedSmallInteger('base_available_day')->nullable()->comment('可用天数');
            $table->string('base_status',64)->nullable()->comment('域名状态');

            $table->unsignedInteger('baidu_included')->nullable()->comment('百度收录量');
            $table->string('baidu_grey',12)->nullable()->comment('百度灰');
            $table->unsignedTinyInteger('baidu_safe')->nullable()->comment('百度安全');
            $table->boolean('baidu_official')->nullable()->comment('百度官网');
            $table->boolean('baidu_v_log')->nullable()->comment('百度V认证');
            $table->boolean('baidu_evaluate')->nullable()->comment('百度评价');
            $table->unsignedTinyInteger('baidu_weight')->nullable()->comment('百度权重');
            $table->unsignedInteger('baidu_re_link')->nullable()->comment('百度反链');
            $table->unsignedTinyInteger('baidu_testing')->nullable()->comment('百度检测');
            $table->unsignedInteger('baidu_re_amount')->nullable()->comment('反向链接数量');
            $table->unsignedTinyInteger('baidu_high_weight_5')->nullable()->comment('高权重5+');
            $table->unsignedTinyInteger('baidu_gov')->nullable()->comment('Gov外链');
            $table->unsignedTinyInteger('baidu_edu')->nullable()->comment('edu外链');

            $table->unsignedInteger('360_included')->nullable()->comment('360收录');
            $table->unsignedTinyInteger('360_weight')->nullable()->comment('360权重');
            $table->boolean('360_official')->nullable()->comment('360官网');

        });
    }

    public function down()
    {
        Schema::dropIfExists('domain_induce_info');
    }
}
